package com.example.servletdemo.listner.attribute;

import javax.servlet.annotation.WebListener;
import javax.servlet.http.HttpSessionAttributeListener;
import javax.servlet.http.HttpSessionBindingEvent;

//@WebListener
public class MyHttpSessionAttributeLister  implements HttpSessionAttributeListener {
    private static final String TAG = "MyHttpSessionAttributeLister";

    @Override
    public void attributeAdded(HttpSessionBindingEvent event) {
        System.out.println(TAG+"=>attributeAdded"+" =>name:"+event.getName()+" value:"+event.getValue());
    }

    @Override
    public void attributeRemoved(HttpSessionBindingEvent event) {
        System.out.println(TAG+"=>attributeRemoved");
    }

    @Override
    public void attributeReplaced(HttpSessionBindingEvent event) {
        System.out.println(TAG+"=>attributeReplaced");
    }
}
